<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试远程提交</title>
</head>
<body>
<p id="p1">element</p>
<div onclick="console.log('div')">
    <p onclick="console.log('p')">
        Click here!
    </p>
</div>
<script>
    function doSomething() {
        alert(this);
    }
    var element= document.getElementById("p1");
    element.onclick = function (){doSomething()};


</script>
</body>
</html>